var classification = new Vue({
		el: "#app",
		data: {
			isActive: 0,
			list: ['全部', '培元灸', '砭石方灸', '培元视界', '体态管理'],
			Data: [{
				id: 0,
				img: '../../template/static/img/1.jpg',
				text: '准上人关热与相青音铁构素法百科单',
				text2: '15.3'
			}, {
				id: 1,
				img: '../../template/static/img/1.jpg',
				text: '准上人关热与相青音铁构素法百科单',
				text2: '15.3'
			}, {
				id: 2,
				img: '../../template/static/img/1.jpg',
				text: '准上人关热与相青音铁构素法百科单',
				text2: '15.3'
			}, {
				id: 3,
				img: '../../template/static/img/1.jpg',
				text: '准上人关热与相青音铁构素法百科单',
				text2: '15.3'
			}, ]
		},
		//计算属性
		computed: {},
		//监听属性
		watch: {},
		//钩子函数
		created: function() {
			if (document.URL.indexOf("?") < 0) return; //获取当前url地址,如果没参数.直接返回
			var str = document.URL.split("?")[1];
			var obj = {};
			var arr;
			//当只有一个参数传过来时
			if (str.indexOf("&") < 0) {
				if (str.indexOf("=") < 0) return;
				arr = str.split("=");
				obj[arr[0]] = arr[1];
				this.isActive = obj.id
				console.log('id', this.isActive);
				console.log('obj', obj);
				return obj;
			}
		},
		mounted() {

		},
		methods: {
			tab(index) {
				this.isActive = index
				console.log('哈哈哈', this.isActive);
			},
			details(id) {
				console.log(id);
				window.location.href = "details.html?id=" + id
			},
			search: function() {
				console.log('搜搜');
				window.location.href = "search.html"
			},
			add_car: function() {
				window.location.href = "the_shopping_cart.html"
			}

		}
	})
